@extends('layouts.admin')
@section('content')
	<div id="content-header">
		<h1>友情链接管理</h1>
		<div class="btn-group">
			<a class="btn btn-large tip-bottom" title="Manage Files"><i class="icon-file"></i></a>
			<a class="btn btn-large tip-bottom" title="Manage Users"><i class="icon-user"></i></a>
			<a class="btn btn-large tip-bottom" title="Manage Comments"><i class="icon-comment"></i><span class="label label-important">5</span></a>
			<a class="btn btn-large tip-bottom" title="Manage Orders"><i class="icon-shopping-cart"></i></a>
		</div>
	</div>
	<div id="breadcrumb">
				<a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>友情链接列表</a>
				<a href="#" class="current">友情链接详情</a>
			</div>
	<div class="container-fluid">
				<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-title">
								<span class="label label-info"><a href="{{url('admin/LinkCreate')}}" style="color:white">添加链接</a></span>
							</div>
							<div class="widget-content">
								<table class="table table-bordered table-striped with-check">
									<thead>
										<tr>
											<th>ID</th>
											<th>链接名称</th>
											<th>链接地址</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody id="tb">
									@foreach($result as $link)
										<tr>
											<td style="text-align:center;line-height:50px">{{$link->id}}</td>
											<td style="text-align:center;line-height:50px">{{$link->linkname}}</td>
											<td style="text-align:center;line-height:50px">{{$link->linkurl}}</td>
											<td style="text-align:center;line-height:50px">
                                                <button type="button" class="btn btn-success"><a href="{{url('admin/LinkEdit',['id'=>$link->id])}}" style="color:white">修改</a></button> |
                                                <button type="button" class="btn btn-danger"><a href="{{url('admin/LinkDel',['id'=>$link->id])}}"onclick="if(confirm('确定删除吗?')==false) return false;" style="color:white">删除</a></button> |
                                                <button type="button" class="btn btn-danger"><a href="{{url('admin/LinkCreate')}}" style="color:white">添加链接</a></button></td>
										</tr>
										@endforeach
									</tbody>
								</table>
                                <div style="float:right;">
                                    {{$result->links()}}
                                </div>
							</div>
						</div>

					</div>
				</div>
				<div class="row-fluid">
					<div id="footer" class="span12">
						2012 &copy; Unicorn Admin. Brought to you by <a href="https://wrapbootstrap.com/user/diablo9983">diablo9983</a>
					</div>
				</div>
			</div>
@endsection